import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/page/Index'



import homepage from '@/page/catalogue/homepage'
import essentialdata from '@/page/catalogue/essentialdata'
import statement from '@/page/catalogue/statement'
import systemcore from '@/page/catalogue/systemcore'
import personalcenter from '@/page/catalogue/personalcenter'

import ClientManager from '@/page/system_manager/ClientManager'
import ActivityManager from '@/page/system_manager/ActivityManager'
import TradeManager from '@/page/system_manager/TradeManager'
import CompanyManager from '@/page/system_manager/CompanyManager'
import IndustrialManagement from '@/page/system_manager/IndustrialManagement'



import Customerstatements from '@/page/system_manager/statementcore/Customerstatements'
import Actionstatements from '@/page/system_manager/statementcore/Actionstatements'
import Companystatements from '@/page/system_manager/statementcore/Companystatements'

import Administratorment from '@/page/system_manager/managerments/Administratorment'
import Rolement from '@/page/system_manager/managerments/Rolement'
import dictionaryment from '@/page/system_manager/managerments/dictionaryment'

import changepassword from '@/page/system_manager/Admin/changepassword'


Vue.use(Router)

export default new Router({
  routes: [{
      // path: '/',
      // name: 'Login',
      // component: Login
      path: '/',
      name: 'Index',
      component: Index,
      redirect: '/homepage',
      children: [{
        path: '/homepage',
        name: 'homepage',
        component:homepage
      },
      {
        path: '/essentialdata',
        name: 'essentialdata',
        component: essentialdata,
        redirect: '/ClientManager',
        children: [{
            path: '/ClientManager',
            name: 'ClientManager',
            component: ClientManager
          },


          {
            path: '/ActivityManager',
            name: 'ActivityManager',
            component: ActivityManager
          },
          {
            path: '/TradeManager',
            name: 'TradeManager',
            component: TradeManager
          },
          {
            path: '/CompanyManager',
            name: 'CompanyManager',
            component: CompanyManager
          },
          {

            path: '/IndustrialManagement',
            name: 'IndustrialManagement',

            component: IndustrialManagement
          },



        ]
      },
      {
        path: 'statement',
        name: 'statement',
        component:statement,
        redirect:'/Customerstatements',
        children:[{
          path: '/Customerstatements',
        name: 'Customerstatements',
        component:Customerstatements
        },
        {
          path: '/Actionstatements',
        name: 'Actionstatements',
        component:Actionstatements
        },
        {
          path: '/Companystatements',
        name: 'Companystatements',
        component:Companystatements
        }
      ]
      },
      {
        path: '/systemcore',
        name: 'systemcore',
        component:systemcore,
        redirect:'/Administratorment',
        children:[{
          path: '/Administratorment',
        name: 'Administratorment',
        component:Administratorment
        },
        {
          path: '/Rolement',
        name: 'Rolement',
        component:Rolement
        },
        {
          path: '/dictionaryment',
        name: 'dictionaryment',
        component:dictionaryment
        }
      ]
      },
      {

        path: '/personalcenter',
        name: 'personalcenter',
        component: personalcenter,
        redirect: '/changepassword',
        children: [{
            path: '/changepassword',
            name: 'changepassword',
            component: changepassword
          }

        ]

      }
    ]
  }]
})
